﻿using System.Linq.Expressions;
using YNTK.Employees.Entitys.Entity;

namespace YNTK.Employees.Interface
{
    /// <summary>
    /// 员工服务
    /// 版 本：V1.0.0.0.0
    /// 版 权：云南通科科技有限公司（https://www.yntkkj.com）
    /// 作 者：李仕鹏
    /// 日 期：2022.11.02
    /// </summary>
    public interface IEmployeesService
    {
        /// <summary>
        /// 根据员工id获取员工信息
        /// </summary>
        /// <param name="employeeId">员工id</param>
        /// <returns></returns>
        Task<EmployeesEntity> GetEmployeeInfoAsync(string employeeId);

        /// <summary>
        /// 根据条件获取员工信息
        /// </summary>
        /// <param name="where">条件</param>
        /// <returns></returns>
        Task<EmployeesEntity> GetEmployeesInfoAsync(Expression<Func<EmployeesEntity, bool>> where);

        /// <summary>
        /// 根据条件获取员工数据
        /// </summary>
        /// <param name="where">条件</param>
        /// <returns></returns>
        Task<List<EmployeesEntity>> GetEmployeesListAsync(Expression<Func<EmployeesEntity, bool>> where);

        /// <summary>
        /// 添加员工信息
        /// </summary>
        /// <param name="model">员工信息</param>
        /// <returns></returns>
        Task AddEmployeesAsync(EmployeesEntity model);

        /// <summary>
        /// 修改员工信息
        /// </summary>
        /// <param name="model">员工信息</param>
        /// <returns></returns>
        Task UpdateEmployeesAsync(EmployeesEntity model);

        /// <summary>
        /// 删除员工
        /// </summary>
        /// <param name="id">员工id</param>
        /// <returns></returns>
        Task DeleteEmployeesAsync(string id);
    }
}
